//
//  YMTypealias.swift
//  ChengLuMall
//
//  Created by 吳梓杭 on 2023/5/28.
//

import Foundation
import Alamofire
import Moya

public typealias YMMethod = Moya.Method
public typealias YMParameters = Alamofire.Parameters
public typealias YMParameterEncoding = Alamofire.ParameterEncoding
public typealias APIPlugins = [YMPluginSubType]
public typealias MapJSONResult = Result<Any, MoyaError>
public typealias MoyaResult = Result<Moya.Response, MoyaError>
public typealias ConfigurationTuple = (result: MoyaResult?, endRequest: Bool, session: Moya.Session?)
public typealias LastNeverTuple = (result: MoyaResult, againRequest: Bool, mapResult: MapJSONResult?)
public typealias LastNeverCallback = ((LastNeverTuple) -> Void)?
public typealias APISuccess = ((_ response: YMResponse) -> Void)?
public typealias APIFailure = ((_ response: YMResponse, _ error: Swift.Error) -> Void)?
